#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[])
{
    int n;scanf("%d", &n);
    static int a[1010];
    static int b[1010];
    int ans=0;
    for (int i = 0 ; i < n ; ++i)
    {
        int num;scanf("%d", &num);
        if(num<0){
            num*=-1;
            b[num]=1;
            if(a[num])++ans;
        }else{
            a[num]=1;
            if(b[num])++ans;
        }
    }
    printf("%d\n", ans);
    return 0;
}